POV-Ray : Newsgroups : povray.general : Problem shaping a CSG object : Re: Problem shaping a CSG object Server Time
30 Jul 2024 06:24:53 EDT (-0400)
  Re: Problem shaping a CSG object  
From: Chris B
Date: 29 Jul 2009 07:22:30
Message: <4a7030f6@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote in message 
news:4a702978@news.povray.org...
>
> "Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote in message 
> news:4a70161e@news.povray.org...
>> Hi all,
>>
>> I need a CSG object that basically has the shape of a cone, but with the 
>> apex as a straight edge parallel to the base, with a length equal to the 
>> diameter of the base. I tried all kinds of combinations but am unable to 
>> get this right.
>>
>> Any help will be much appreciated. Thanks a lot.
>
> An Isosurface is the easiest and quickest and is technically CSGable.
> Otherwise you can get the same shape by taking slices of a squashed 
> sphere.
> Both are illustrated below. Turning up the interval for the slicing gives 
> smoother results, but less interesting render times.
>
> Regards,
> Chris B.
>

While making a cup of tea it just occurred to me that you can also do it 
with two sheared cones and a filler:

#include "transforms.inc"
merge {
  cone {0,1,y,0 Shear_Trans(x,<-1,1,0>,z)}
  cone {0,1,y,0 Shear_Trans(x,< 1,1,0>,z)}
  intersection {
    plane {< 0, 1, 1>,0 translate y}
    plane {< 0, 1,-1>,0 translate y}
    plane {<-1,-1, 0>,0}
    plane {< 1,-1, 0>,0}
  }
  pigment {rgb 1}
}

Just goes to show that a good cup of tea can solve many problems  :-)

Regards,
Chris B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.